import React, { FC, useState } from 'react'
import { ImageUploader, Space, Toast, Dialog } from 'antd-mobile'
import { ImageUploadItem } from 'antd-mobile/es/components/image-uploader'

import { demoSrc, mockUpload, mockUploadFail } from './utils'

// 基础用法
const Basic: FC = () => {
    const [fileList, setFileList] = useState<ImageUploadItem[]>([
        {
            url: demoSrc,
        },
    ])

    return (
        <ImageUploader
            value={fileList}
            onChange={setFileList}
            upload={mockUpload}
        />
    )
}

